home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ For TASM / USRGUIDE.PAK / CSPEC.ASM < prev    next >
Assembly Source File  |  1996-02-21  |  520b  |  25 lines

  1. ; Turbo Assembler example. Copyright (c) 1993 By Borland International, Inc.
  2. ;
  3. ; CSPEC.ASM
  4. ;
  5. ; Usage: bcc link2asm.cpp cspec.asm
  6. ;
  7. ; From the Turbo Assembler User's Guide, Ch. 18
  8.  
  9.      .MODEL    SMALL
  10.      .DATA
  11.      EXTRN     C Flag:word
  12.      .CODE
  13.      PUBLIC    C ToggleFlag
  14. ToggleFlag     PROC
  15.      cmp       [Flag],0
  16.      jz        SetTheFlag
  17.      mov       [Flag],0
  18.      jmp       short EndToggleFlag
  19. SetTheFlag:
  20.      mov       [Flag],1
  21. EndToggleFlag:
  22.      ret
  23. ToggleFlag     ENDP
  24.      END
  25.